class UserMailerWorker < BackgrounDRb::MetaWorker
  set_worker_name :user_mailer_worker

  def create(args = nil)
    # this method is called, when worker is loaded for the first time
  end

  def deliver_signup_notification(user_id)
    user = User.find_by_id(user_id)
    UserMailer.deliver_signup_notification(user) if user
  end

  def deliver_activation(user_id)
    user = User.find_by_id(user_id)
    UserMailer.deliver_activation(user) if user
  end
end

